/*
 * @Author: pengtianrui 2276608413@qq.com
 * @Date: 2024-07-19 14:42:56
 * @LastEditors: 武兴创 superjava@vip.qq.com
 * @LastEditTime: 2024-08-28 17:44:02
 * @FilePath: \SGFEM\DataStructure\FEM\Element\include\CONM2Data.h
 * @Description:  广义集中质量单元数据
 * CONM2
 */
#pragma once
#include "DataStructure/Common/DataStructureNamespace.h"
#include "DataStructure/Common/Id.h"
#include "DataStructure/Common/Real.h"
#include "DataStructure/Input/Element/ElementBase.h"

SG_DATASTRUCTURE_FEM_NAMESPACE_OPEN
struct DECLSPEC CONM2Data : public ElementBase
{
    SG::DataStructure::Common::Id   m_g[1]  = { 0 };    ///< 节点号
    SG::DataStructure::Common::Id   m_cId   = 0;        ///< 单元坐标系, >= -1, 默认值0
    SG::DataStructure::Common::Real m_mass  = 0.0;      ///< 质量
    SG::DataStructure::Common::Real m_x[3]  = { 0.0 };  ///< 质量点偏移量
    SG::DataStructure::Common::Real m_I1[1] = { 0.0 };  ///< 质量二次矩
    SG::DataStructure::Common::Real m_I2[2] = { 0.0 };
    SG::DataStructure::Common::Real m_I3[3] = { 0.0 };
    ///< 当 m_CID = -1， m_offset表示节点的位置

    SG::DataStructure::Common::Id m_domainId = 0;
};

/// @brief 判断两个CONM2Data是否相等
/// @param a
/// @param b
/// @return
DECLSPEC bool operator== (CONM2Data& a, CONM2Data& b);

SG_DATASTRUCTURE_FEM_NAMESPACE_CLOSE
